<div class="notice warning" id="version_guess" style="display: <?=(((!$this->is_add) && ($this->version != $this->model_firmware->getVersion())) ? "block" : "none" )?>;">
    <ul type="circle" style="padding-left: 20px;">
        <li id="li_version_guess">Guessed version [<?=$this->version ?>] is differ from used version [<?=$this->model_firmware->getVersion() ?>]</li>
    </ul>
</div>
<?=$this->messages(); ?>
<?=$this->itemId($this->model_firmware->getID()); ?>
<?=$this->reloadFlag(true); ?>
        <table>
    <tr>
        <td class="title">Caption:</td>
        <td class="input_field">
            <input type="text" name="caption" id="caption" value="<?=$this->model_firmware->getCaption() ?>" />
        </td>
    </tr>
    <tr>
        <td class="title">Vendor:</td>
        <td class="input_field">
            <select name="vendor" disabled="disabled">
                <option value="1" selected>Linksys/Cisco</option>
            </select>
        </td>
    </tr>
    <tr>
<?
    if ($this->is_add)
    {
?>
        <td class="title">Upload a file:</td>
        <td class="input_field">
            <input type="file" name="file" id="file" onChange="event_onChange_Firmware()"/>
        </td>
<?
    }
    else
    {
?>
        <td class="title">File name:</td>
        <td class="input_field"><input type="text" name="file_rd" id="file_rd" disabled="disabled" value="<?=$this->model_firmware->getFileName() ?>"/></td>
        <td class="description">Firmware re-upload is prohibited due to security violation</td>
<?
    };
?>
    </tr>
    <tr>
        <td class="title">Version:</td>
        <td class="input_field">
            <input type="text" name="version" id="version" value="<?=$this->model_firmware->getVersion(); ?>" onkeyup="event_onKeyPress_FirmwareVersion(event)"/>
            <input type="hidden" name="firmware_version" id="firmware_version" value="<?=$this->version ?>"/>
        </td>
        <td class="description">Will cause an infinite loop if it is wrong!</td>
    </tr>
<?
    if (!$this->is_add)
    {
?>
    <tr>
        <td class="title">Used in types:</td>
        <td class="input_field">
            <ul type="circle" style="padding-left: 20px;">
<?
        foreach ($this->used_in_types as $model_type)
            echo "<li><a href=\"\" onclick=\"navigateMenu('types', EXPAND_TYPES); ajaxTypes({id: ".$model_type->getID().", action: 'edit', container: 'inner', no_apply: true}); return false;\">".$model_type->getCaption()."</a></li>";
?>
            </ul>
        </td>
    </tr>
<?
    };
?>
</table>
<?=$this->buttons(); ?>
